package com.demo.alibaba.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Created by yangshunxing on 2017/3/22.
 */
public class TClass {
    static class Food{}
    static class Fruit extends Food{}
    static class Apple extends Fruit{}
    static class RedApple extends Apple{}

    public static void main(String[] args) {

        List<? extends Fruit> flist = new ArrayList<Apple>();
        List<Apple> apples = new ArrayList<>();
        apples.add(new Apple());
        flist = apples;
        Apple apple = (Apple)flist.get(0);
        Food food = (Food)flist.get(0);


        List<? super Fruit> flist1 = new ArrayList<Fruit>();
        flist1.add(new Fruit());
        flist1.add(new Apple());
        flist1.add(new RedApple());
        Apple item = (Apple)flist.get(0);

        String key = "yangshunxing";
        int h;
        HashMap map = new HashMap();
        System.out.println(key.hashCode());
        System.out.println(key.hashCode() >>> 16);
        System.out.println((-1571642663)^41554);
        System.out.println((key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16));
    }
}
